package com.datax.web.serviceimpl;

import com.datax.web.dao.CommonDao;
import com.datax.web.service.CommonService;
import org.apache.commons.collections.MapUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


@Service
public class CommonServiceImpl implements CommonService {
	
	@Autowired
	private CommonDao commonDao;
	
	@Override
	public List<Map<String, Object>> getDropItem(String enumCode) {
		Map<String, Object> map = commonDao.getDictionarySql(enumCode);
		return commonDao.getDynamicData(MapUtils.getString(map, "sqlselect"));
	}
}
